package Ants.Model;

import java.util.Comparator;

public class TileComparator implements Comparator<Tile>{
	
	//Usato per un maxHeap, i valori sono invertiti
	@Override
	public int compare(Tile t1, Tile t2) {
		int f1 = t1.getF(); 
		int f2 = t2.getF(); 
		
		if(f1 > f2){
			return 1;
		}				
		else if(f1 == f2){
			return 0;
		}				
		else{
			return -1;
		}		
	}
	
}